<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <ul id="ul">
    <li>我是li标签1</li>
    <li>我是li标签2</li>
    <li>我是li标签3</li>
    <li>我是li标签4</li>
    <li>我是li标签5</li>
  </ul>
</body>
<script>
  var box3 = document.getElementById("ul").lastElementChild;
  console.log(box3);
</script>

</html>